﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using QxFramework.Utilities;
using QxFramework.Core;
using System;

namespace App.Procedure
{
    public class StartProcedure : ProcedureBase
    {
        private MessageQueue<TapMsg> _tapMessageQueue;
        public override void OnEnter()
        {
            base.OnEnter();
            Debug.Log("Hello World");
            Debug.Log(TableAgent.Instance.GetString("Config", "LookADIncome", "Description"));
            _tapMessageQueue = MessageManager.Instance.Get<TapMsg>();
            _tapMessageQueue.RegisterHandler(TapMsg.TapDown, TapDown);
        }

        public override void OnUpdate(float elapseSeconds)
        {
            base.OnUpdate(elapseSeconds);
        }

        public override void OnLeave()
        {
            base.OnLeave();
        }

        private void TapDown(object sender, EventArgs args)
        {

            var tapingPos = (Vector3)sender;

            Debug.Log(tapingPos);

        }
    }
}
